#include "stm32f4xx.h"
#include "bsp_gpio.h"
#include "bsp_delay.h"
#include "bsp_uart.h"
#include "head.h"
#include "arm_math.h"
#include "capture.h"

int main(void)
{
	bsp_gpio_init(GPIOF,GPIO_Pin_10,GPIO_Mode_OUT,GPIO_PuPd_DOWN);
	bsp_gpio_init(GPIOF,GPIO_Pin_9,GPIO_Mode_OUT,GPIO_PuPd_DOWN);
	bsp_uart_init(USART1,0,115200);
	
	capture_init();
	
	while(1)
	{
//		printf("TEST!!!%-12f\r\n",arm_cos_f32(20));
		printf("%-12d%-12d::%-12d%-12d\r\n",capture[0].higt,capture[0].T,capture[1].higt,capture[1].T);
		PFout(10) = 1;
		PFout(9) = 1;
		bsp_delay_ms(50);
		PFout(9) = 0;
		PFout(10) = 0;
		bsp_delay_ms(50);
		
	}
}
